package com.hy.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * Created With IntelliJ IDEA.
 * Descriptions:
 * author: Mr.Du
 * Date: 2023/7/20
 * Time: 10:49
 */
@Slf4j
@Service
public class CacheService {

    @Cacheable("add")
    public int add(int a, int b){
        int sum = a + b;
        log.info("{} + {} = {}", a, b, sum);
        return sum;
    }
}
